/**
 */
package com.dingpeikeji.quickdeer.core.modules.bus.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;

import com.dingpeikeji.quickdeer.core.common.persistence.DataEntity;
import com.dingpeikeji.quickdeer.core.common.utils.excel.annotation.ExcelField;
import com.dingpeikeji.quickdeer.core.modules.driver.entity.TDrivers;
import com.dingpeikeji.quickdeer.core.modules.sys.entity.Office;
import com.dingpeikeji.quickdeer.modules.rentproduct.entity.TCargotype;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.validation.constraints.NotNull;

/**
 * 巴士管理Entity
 * 
 * @author Zhaoy
 * @version 2016-05-20
 */
public class TCompBus extends DataEntity<TCompBus> {

	private static final long serialVersionUID = 1L;
	// 营运范围的值
	public static final String OPERATE_AREA_LOCAL = "1"; // 非省际
	public static final String OPERATE_AREA_INTER = "4"; // 省际
	
	//车辆状态
	public static final String ST_IN_USE = "0"; // 使用中
	public static final String ST_IN_HALT = "1"; // 已停用
	public static final String ST_OFF_SELL = "2"; // 已下架
	
	private String busid; // 主键
	private Office office; // 公司ID
	private TCargotype	cartype; //车型
	private String vehiclename; // 车辆描述
	private String brand; // 车辆品牌
	private String busclass; // 车辆等级
	private String enginetype; // 动力类型
	private String licenseno; // 车牌号
	private Integer seats; // 座位数
	private Integer seatsforsale; // 座位数
	private String certino; // 车辆营运证号
	private String operatearea;		//营运范围
	private String bodycolor; // 车辆颜色
	private String permittype; // 准驾车型
	private String busstatus; // 车辆状态
	private Date regdate; // 首次购车开票日期
	private Date purchasedate; // 首次上牌登记日期
	private String travelins; // 乘运险
	private String thirdins; // 第三者责任险
	private String ownerid; // 联系人ID
	private String owner; // 联系人
	private String ownertel; // 联系人手机
	private Date inspectdate; // 年检日期
	private Date ddate; // 二维日期
	private Date startdate; // 开始时间
	private Date enddate; // 结束时间
	private String drvssysid; // 司机id
	private String drvname; // 司机名称
	private String mobile;	//主驾手机
	private String busdrvid; // 车辆司机id
	private String type; // 司机类型
	private String maindriver;// 主司机
	private String vicedriver;// 第一副司机
	private String delflag;
	private String create_date;
	private String createby;

	private String iselectric;
	private String endurance;
	private String lugage;
	private String thirddriver;
	private Date offbegin; // 停用开始时间
	private Date offend; // 停用结束时间
	private String bustype;//车辆属性 0公营 1承包
	
	public TCompBus() {
		super();
	}

	public TCompBus(String id) {
		super(id);
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getBustype() {
		return bustype;
	}

	public void setBustype(String bustype) {
		this.bustype = bustype;
	}

	public String getBusdrvid() {
		return busdrvid;
	}

	public void setBusdrvid(String busdrvid) {
		this.busdrvid = busdrvid;
	}

	public String getDrvssysid() {
		return drvssysid;
	}

	public void setDrvssysid(String drvssysid) {
		this.drvssysid = drvssysid;
	}

	public String getDrvname() {
		return drvname;
	}

	public void setDrvname(String drvname) {
		this.drvname = drvname;
	}

	public String getBusid() {
		return busid;
	}

	public void setBusid(String busid) {
		this.busid = busid;
	}

	@JsonIgnore
	@NotNull(message = "归属部门不能为空")
	@ExcelField(title = "归属部门", align = 2, sort = 25)
	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	//@Length(min = 1, max = 200, message = "车辆型号长度必须介于 1 和 200 之间")
	public String getVehiclename() {
		return vehiclename;
	}

	public void setVehiclename(String vehiclename) {
		this.vehiclename = vehiclename;
	}

	@Length(min = 0, max = 50, message = "车辆品牌长度必须介于 1 和 50 之间")
	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	@Length(min = 0, max = 10, message = "车辆等级长度必须介于0 和 10 之间")
	public String getBusclass() {
		return busclass;
	}

	public void setBusclass(String busclass) {
		this.busclass = busclass;
	}

	@Length(min = 0, max = 10, message = "动力类型长度必须介于 0 和 10 之间")
	public String getEnginetype() {
		return enginetype;
	}

	public void setEnginetype(String enginetype) {
		this.enginetype = enginetype;
	}

	@Length(min = 1, max = 20, message = "车牌号长度必须介于 1 和 20 之间")
	public String getLicenseno() {
		return licenseno;
	}

	public void setLicenseno(String licenseno) {
		this.licenseno = licenseno;
	}

	public Integer getSeats() {
		return seats;
	}

	public void setSeats(Integer seats) {
		this.seats = seats;
	}

	@Length(min = 0, max = 20, message = "车辆营运证号长度必须介于 0 和 20 之间")
	public String getCertino() {
		return certino;
	}

	public void setCertino(String certino) {
		this.certino = certino;
	}

	public String getOperatearea() {
		return operatearea;
	}

	public void setOperatearea(String operatearea) {
		this.operatearea = operatearea;
	}
	
	@Length(min = 0, max = 1, message = "车辆颜色长度必须介于 0 和 1 之间")
	public String getBodycolor() {
		return bodycolor;
	}

	public void setBodycolor(String bodycolor) {
		this.bodycolor = bodycolor;
	}

	@Length(min = 0, max = 20, message = "行车类型长度必须介于 0 和 20 之间")
	public String getPermittype() {
		return permittype;
	}

	public void setPermittype(String permittype) {
		this.permittype = permittype;
	}

	@Length(min = 1, max = 1, message = "车辆状态长度必须介于 1 和 1 之间")
	public String getBusstatus() {
		return busstatus;
	}

	public void setBusstatus(String busstatus) {
		this.busstatus = busstatus;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
	//@NotNull(message = "上牌日期不能为空")
	public Date getRegdate() {
		return regdate;
	}

	public void setRegdate(Date regdate) {
		this.regdate = regdate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
//	@NotNull(message = "购车日期不能为空")
	public Date getPurchasedate() {
		return purchasedate;
	}

	public void setPurchasedate(Date purchasedate) {
		this.purchasedate = purchasedate;
	}

	//@Length(min = 1, max = 10, message = "乘运险长度必须介于 1 和 10 之间")
	public String getTravelins() {
		return travelins;
	}

	public void setTravelins(String travelins) {
		this.travelins = travelins;
	}

	//@Length(min = 1, max = 10, message = "第三者责任险长度必须介于 1 和 10 之间")
	public String getThirdins() {
		return thirdins;
	}

	public void setThirdins(String thirdins) {
		this.thirdins = thirdins;
	}

	public String getOwnerid() {
		return ownerid;
	}

	public void setOwnerid(String ownerid) {
		this.ownerid = ownerid;
	}

	/* @Length(min=1, max=30, message="联系人长度必须介于 1 和 30 之间") */
	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

	/* @Length(min=1, max=20, message="联系人手机长度必须介于 1 和 20 之间") */
	public String getOwnertel() {
		return ownertel;
	}

	public void setOwnertel(String ownertel) {
		this.ownertel = ownertel;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
	public Date getInspectdate() {
		return inspectdate;
	}

	public void setInspectdate(Date inspectdate) {
		this.inspectdate = inspectdate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
	public Date getDdate() {
		return ddate;
	}

	public void setDdate(Date ddate) {
		this.ddate = ddate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
	/* @NotNull(message="开始时间不能为空") */
	public Date getStartdate() {
		return startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}

	@JsonFormat(pattern = "yyyy-MM-dd ")
	/* @NotNull(message="结束时间不能为空") */
	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}

	public String getMaindriver() {
		return maindriver;
	}

	public void setMaindriver(String maindriver) {
		this.maindriver = maindriver;
	}

	public String getVicedriver() {
		return vicedriver;
	}

	public void setVicedriver(String vicedriver) {
		this.vicedriver = vicedriver;
	}

	public String getDelflag() {
		return delflag;
	}

	public void setDelflag(String delflag) {
		this.delflag = delflag;
	}

	public String getCreate_date() {
		return create_date;
	}

	public void setCreate_date(String create_date) {
		this.create_date = create_date;
	}

	public String getCreateby() {
		return createby;
	}

	public void setCreateby(String createby) {
		this.createby = createby;
	}

	public Integer getSeatsforsale() {
		return seatsforsale;
	}

	public void setSeatsforsale(Integer seatsforsale) {
		this.seatsforsale = seatsforsale;
	}

	public String getIselectric() {
		return iselectric;
	}

	public void setIselectric(String iselectric) {
		this.iselectric = iselectric;
	}

	public String getEndurance() {
		return endurance;
	}

	public void setEndurance(String endurance) {
		this.endurance = endurance;
	}

	public String getLugage() {
		return lugage;
	}

	public void setLugage(String lugage) {
		this.lugage = lugage;
	}

	public String getThirddriver() {
		return thirddriver;
	}

	public void setThirddriver(String thirddriver) {
		this.thirddriver = thirddriver;
	}

	public Date getOffbegin() {
		return offbegin;
	}

	public void setOffbegin(Date offbegin) {
		this.offbegin = offbegin;
	}

	public Date getOffend() {
		return offend;
	}

	public void setOffend(Date offend) {
		this.offend = offend;
	}

	public TCargotype getCartype() {
		return cartype;
	}

	public void setCartype(TCargotype cartype) {
		this.cartype = cartype;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	
}
